<%@ page import="java.util.*" %><%--
  Created by IntelliJ IDEA.
  User: 凉城
  Date: 2021/12/13
  Time: 9:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>99乘法表</title>
    <style>
        * {

            background-color: cyan;
        }

        span {
            display: inline-block;
            color: red;
            font-size: 18px;
            font-weight: 700;
            margin: 20px 40px;
        }
    </style>
</head>
<body>
<%
    for (int i = 1; i < 10; i++) {
        for (int j = 1; j <= i; j++) {
%>

<span><%= j%>*<%= i%>=<%= i * j%></span>
<%
    }
%><br><%
    }
%>


<%!
    private static int id;
    private String name;
    private static Map<String, String> map;

    static {
        id = 1;
        map = new HashMap<>();
        map.put("key1", "value1");
        map.put("key2", "value1");
        map.put("key3", "value1");
        map.put("key4", "value1");
    }

    public class classOne {
        private Integer id = 5;
        private String name = "张三";
    }
%>
静态代码块的ID是：
<%= id%><br>
map遍历：
<%
    Set<Map.Entry<String, String>> entries = map.entrySet();
    Iterator<Map.Entry<String, String>> iterator = entries.iterator();
    while (iterator.hasNext()) {
        Map.Entry<String, String> next = iterator.next();
%>
Key是：<%=next.getKey()%>，value是<%=next.getValue()%><br>
<%
    }
%>
<%
    classOne classOne = new classOne();
%>
classOne的ID是：<%=classOne.id%>
classOne的name是：<%=classOne.name%><br>

<%= classOne%><br>
<%= "classOne"%><br>
<%= 1212%><br>
<%= new Date()%><br>

<%
    if (id > 3) {
%>
好滴很
<%
} else {
%>
一边玩去
<%
    }
%>
<br>
<%
    for (int i = 0; i < 10; i++) {
%>
哎，就是玩for<%=i%>
<%
    }
%>
<br>
<%
    int i = 0;
    while (i < 10) {
%>
哎，就是玩while<%=i%>
<%
        i++;
    }
%>
</body>
</html>
